import request from '@/utils/request'

export function getList(pageNum, pageSize, studentName, phone, studentCode, clasId) {
    return request({
      url: '/web/studentInfo/getPage',
      method: 'get',
      params: { pageNum, pageSize, studentName, phone, studentCode, clasId }
    })
}

export function add(data) {
    return request({
        url: 'web/studentInfo/add',
        method: 'post',
        data
    })
}

export function del(id) {
    return request({
        url: 'web/studentInfo/del/' + id,
        method: 'DELETE'
    })
}

export function update(data) {
    return request({
        url: 'web/studentInfo/update',
        method: 'post',
        data
    })
}

export function getEdi(id) {
    return request({
        url: 'web/studentInfo/' + id,
        method: 'get'
    })
}


export function delFlag(id) {
    return request({
        url: 'web/studentInfo/updateByDeleteFlag/' + id,
        method: 'get'
    })
}

export function iport() {
    return request({
        url: 'web/studentInfo/import',
        method: 'get',
      //  params: {url}
    })
}

// export function eport(studentName, studentCode, phonenumber, classId, delFlag) {
//     return request({
//         url: 'web/studentInfo/export',
//         method: 'get',
//         responseType: 'blob',
//         params: { studentName, studentCode, phonenumber, classId, delFlag }
//     })
// }
export function exportStu(data) {
    return request({
      url: 'web/studentInfo/export',
      method: 'post',
      data
    })
}